<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@include file="../common/jspcommon.jsp"%>
<script type="text/javascript">

$(function(){
	$("#pager").pager({ pagenumber: ${pageModel.currentPage}, 
						pagecount: ${pageModel.totalPage},
						buttonClickCallback: function(page){
							$("#content_detail").load("maybeFriends.htm?page="+page);
						}
	});
});
	function addFriendButton(doorplate){
		$("#add_friend_dialog").load("friendAdd.htm?doorplate="+doorplate);
		$("#add_friend_dialog").show();
	}
</script>


<div class="h_main2">
	<div class="h_data">
		<h2>
			街坊查找
		</h2>
		<div class="h_newNews">
			<ul>
				<li id="newNews1" onclick="searchFriendCondition('1');"
					class="h_newNewsHover">
					<a>可能认识的街坊</a>
				</li>
				
				<div class="clear"></div>
			</ul>
			<div class="clear"></div>
		</div>
		<div class="h_newNews_box">
			<div class="h_newNews_text" id="con_newNews_1"
				style="display: block;">
				<div class="success" id="message_send_friend_tip_success"
					style="display: none;">
					<img alt="保存成功" src="images/home_images/ico29.png" />
					邻居请求已发送
				</div>
				<div class="h_findfriends_list pt10">
					<c:choose>
						<c:when test="${pageModel.totalRecord < 1}">
					没有符合您的条件的邻居
				</c:when>
						<c:otherwise>
							<ul>
								<c:forEach items="${pageModel.list}" var="friendFamily">
									<li>
										<c:if
											test="${friendFamily.doorplate!=member.family && (friendFamily.friendId==null||friendFamily.friendId=='')}">
											<span><a href="javascript:void(0);" class="bn"
												onclick="addFriendButton('${friendFamily.doorplate}');">做邻居</a>
											</span>
										</c:if>

										<a href="#" title="进入他的家" onclick="seeOtherFamily('${friendFamily.doorplate}')"><img
												src="${friendFamily.avatar}" width="58" height="58" alt="头像" />
										</a>
										<em>家昵称：<a href="javascript:void(0);"
											onclick="seeOtherFamily('${friendFamily.doorplate}')"
											title="进入他的家">${friendFamily.nickname}</a> </em>

										<c:if test="${fn:length(friendFamily.fatherList) >0}">
											<p>
												爸 爸：
												<c:forEach items="${friendFamily.fatherList}" var="father">
													<a href="javascript:void(0);" title="查看个人资料">
														${father.friendName} </a>
												</c:forEach>
											</p>
										</c:if>
										<c:if test="${fn:length(friendFamily.motherList) >0}">
											<p>

												妈 妈：
												<c:forEach items="${friendFamily.motherList}" var="mother">
													<a href="javascript:void(0);" title="查看个人资料">
														${mother.friendName} </a>
												</c:forEach>
											</p>
										</c:if>
										<c:if test="${fn:length(friendFamily.babyList) >0}">
											<p>
												宝 宝：
												<c:forEach items="${friendFamily.babyList}" var="baby">
													<a href="javascript:void(0);" title="查看个人资料">
														${baby.friendName} </a>
												</c:forEach>
											</p>
										</c:if>
										<div class="clear"></div>
									</li>
								</c:forEach>


								<div class="clear"></div>
							</ul>
						</c:otherwise>
					</c:choose>


					<div class="clear"></div>

				</div>
				<div class="h_newNews_text" id="con_newNews_2">
					fdsfsdf
				</div>
				<div class="clear"></div>
			</div>
			<div class="clear"></div>
			<c:if test="${pageModel.totalRecord > 0}">
				<div class="h_page" id="pager"></div>
			</c:if>

		</div>

	</div>
</div>


<div id="add_friend_dialog" class="addFriend" style="display: none;">

</div>
